﻿Imports System.Xml.Serialization
Imports KanBan.Pgd.Common

Namespace Resources

    <XmlType(AnonymousType:=True), _
     XmlRoot(ElementName:="users", [Namespace]:="", IsNullable:=False)> _
    Partial Public Class UserResource

        Private _users As UserItem()

        <XmlElement("user", Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)> _
        Public Property Users() As UserItem()
            Get
                Return _users
            End Get
            Set(ByVal value As UserItem())
                _users = value
            End Set
        End Property

        Public Shared Function GetResource() As UserResource
            Return XmlDeserializer(Of UserResource).Deserialize("Resources\Users.xml")
        End Function

    End Class

    <XmlType(AnonymousType:=True)> _
    Partial Public Class UserItem

        Private _id As String

        Private _name As String

        Private _userName As String

        Private _password As String

        Private _profileId As String

        Private _groupId As String

        <XmlAttribute("id")> _
        Public Property Id() As String
            Get
                Return Me._id
            End Get
            Set(ByVal value As String)
                Me._id = value
            End Set
        End Property

        <XmlAttribute("name")> _
        Public Property Name() As String
            Get
                Return Me._name
            End Get
            Set(ByVal value As String)
                Me._name = value
            End Set
        End Property

        <XmlAttribute("userName")> _
        Public Property UserName() As String
            Get
                Return _userName
            End Get
            Set(ByVal value As String)
                _userName = value
            End Set
        End Property

        <XmlAttribute("password")> _
        Public Property Password() As String
            Get
                Return _password
            End Get
            Set(ByVal value As String)
                _password = value
            End Set
        End Property

        <XmlAttribute("profileId")> _
        Public Property ProfileId() As String
            Get
                Return _profileId
            End Get
            Set(ByVal value As String)
                _profileId = value
            End Set
        End Property

        <XmlAttribute("groupId")> _
Public Property GroupId() As String
            Get
                Return _groupId
            End Get
            Set(ByVal value As String)
                _groupId = value
            End Set
        End Property

    End Class

End Namespace
